﻿using Login.Context;
using Login.DTO.User;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;


namespace Login.Service.ServiceMgm
{
    public interface IUserManagementService
    {
        UserDTO VerifyUser(string username, string passwordSha1);

    }

    class UserManagementService : ServiceBase,IUserManagementService
    {
        public UserManagementService(Guid handlerId)
        {
           HandlerId = handlerId;
        }
        public UserDTO VerifyUser(string username, string passwordSha1)
        {
            var userManagementContext = ContextManagerFactory.CreateUserManagementContext(HandlerId);
            return userManagementContext.VerifyUser(username, passwordSha1);
        }
    }
}
